package com.mes.cloud.dao;

import com.mes.cloud.api.dto.request.employee.BaseEmployeeOrganizationPageRequest;
import com.mes.cloud.api.dto.request.employee.BaseEmployeePageRequest;
import com.mes.cloud.api.dto.request.employee.BaseEmployeePositionPageRequest;
import com.mes.cloud.api.dto.request.employee.BaseEmployeeStatusRequest;
import com.mes.cloud.entity.BaseEmployee;
import com.mes.cloud.entity.SysMenu;
import com.mes.cloud.entity.vo.BaseEmployeeVo;
import com.mes.cloud.entity.vo.employee.BaseEmployeePositionCustomerVo;
import com.mes.cloud.entity.vo.employee.BaseEmployeeTypeVo;
import com.mes.cloud.entity.vo.role.BaseEmployeeOrganizationVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.ids.SelectByIdsMapper;

import java.util.List;

/**
 * 系统用户表
 *
 * @author zhengyangping
 * @email 407892370@qq.com
 * @version 2019-07-31 10:42:39
 */
public interface BaseEmployeeDao extends SelectByIdsMapper<BaseEmployee>, Mapper<BaseEmployee>{

    List<BaseEmployeeVo> selectEmaloyeeList(BaseEmployeePageRequest pageRequest);

    int batchUpdate(@Param("ids") List<String> ids, @Param("status") String status);

    List<SysMenu> myMenuList(@Param("employeeId") String employeeId, @Param("platform") String platform);

    int batchStatus(BaseEmployeeStatusRequest baseEmployeeStatusRequest);

    int updateByEmployeeNo(BaseEmployee baseEmployeeParam);

    List<BaseEmployeeOrganizationVo> selectPageByOrgId(BaseEmployeeOrganizationPageRequest pageRequest);

    List<BaseEmployeeOrganizationVo> selectPageByOrganizationId(BaseEmployeeOrganizationPageRequest pageRequest);

    List<BaseEmployeePositionCustomerVo> listPageByPositionId(BaseEmployeePositionPageRequest pageRequest);

    List<SysMenu> getMenuListByEmployeeIdForAuth(String employeeId);

    /**
     * @Author ysd
     * @Description 同步员工查询
     * @Date 14:43 2019/11/17
     **/
    List<BaseEmployeeOrganizationVo> synchroDataList(@Param("employeeNos") List<String> employeeNos);

    /**
     * 查看主要岗位类型非空的员工
     * @return
     */
    List<BaseEmployee> selectMainPositionTypeNotNull();

    List<String> getPositionTypeRole(String id);

    /**
     * 获取岗位的上级岗位关联的员工
     * @param mainPositionId
     * @return
     */
    String getSuperiorRealName(String mainPositionId);

    BaseEmployeeTypeVo selectEmployee(@Param("employeeNo") String employeeNo);

    List<SysMenu> myMenuListMenu(@Param("employeeId") String employeeId, @Param("platform") String platform);
}
